package com.company;
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
	// write your code here
        /*long temp = 20l;
        System.out.println(Integer.MAX_VALUE + 2);
        System.out.println(Integer.MIN_VALUE);
        System.out.println(temp);
        System.out.println(Long.MAX_VALUE);
        boolean value = true;
        System.out.println(value);
        String name = "My name is \"张三\"";
        String name2 = "haha \"李四\"";
        String name3 = "王五";
        System.out.println(name);
        System.out.println(name2);
        System.out.println(name3);
        int a = 10;
        int b = 20;
        System.out.println("a = " + a + ",b = " + b);
        System.out.println(!(a < b));
        int a = 0xA;
        System.out.println(a);
        System.out.printf("%x\n", a >> 1);
        int b = 0xffff0000;
        System.out.println(b);
        System.out.printf("%x\n", b >> 1);
         */
        /*import java.util.Scanner;
        // 需要导入 util 包
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的姓名：");
        String name = sc.nextLine();
        System.out.println("请输入你的年龄：");
        int age = sc.nextInt();
        System.out.println("请输入你的工资：");
        float salary = sc.nextFloat();
        System.out.println("你的信息如下：");
        sc.close();*/
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int num = 0;
        while (sc.hasNextInt()) {
            int tmp = sc.nextInt();
            sum += tmp;
            System.out.println(sum);
            num++;
        }
        System.out.println("sum = " + sum);
        System.out.println("avg = " + sum / num);
        sc.close();
    }
}
